#ifndef CompVObject_First
#define CompVObject_First
#ifdef __GNUG__
#pragma interface
#endif

#include "VObject.h"

class SeqCollection;

//---- CompositeVObject --------------------------------------------------------

enum CompositeVObjectFlags {
	eCompVObjDefault    = eVObjDefault,
	eCompVObjLast       = eVObjLast+0
};

class CompositeVObject: public VObject {
	SeqCollection *list;
	bool islist;
public:
	MetaDef(CompositeVObject);

	CompositeVObject(int id= cIdNone, SeqCollection *cp= 0);
	CompositeVObject(int id, ...);
	CompositeVObject(int id, va_list ap);
	~CompositeVObject();

	int Size();
	VObject *At(int n);
	VObject *SetAt(int at, VObject *vop);
	void Add(VObject*);
	VObject *Remove(VObject*);
	Iterator *MakeIterator(bool forward= TRUE, void *placement= 0);

	void SetItems(va_list ap);
	void SetItems(VObject *vop, va_list ap);
	void DoObserve(int, int, void*, Object*);
	SeqCollection *GetList();
	void SetExtent(Point);
	void SetOrigin(Point);

	OStream& PrintOn(OStream&);
	IStream& ReadFrom(IStream&);
};

#endif
